package com.bw;

import com.alibaba.fastjson.JSON;
import com.bw.entity.User;
import com.bw.service.UserService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.util.List;

@SpringBootApplication(scanBasePackages={"com.bw.controller","com.bw.service"})
@MapperScan(basePackages={"com.bw.dao"})
public class Springboot1511sApplication implements CommandLineRunner {




	public static void main(String[] args) {
		SpringApplication.run(Springboot1511sApplication.class, args);
	}


	@Autowired
	UserService userService;
	@Override
	public void run(String... strings) throws Exception {
		List<User> users = userService.selectByCondition(new User());
		System.out.println(JSON.toJSONString(users));

	}
}
